<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %> 
<!DOCTYPE>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="惠信钱包，金融">
<meta name="description" content="描述描述描述" />
<%@include file="/WEB-INF/base/commRoot.jsp"%>
<script type="text/javascript" src="/js/jquery.js"></script> 
<script type="text/javascript" src="/js/view/static/static.js"></script>
<script type="text/javascript" src="/js/view/user/login.js"></script>
<script type="text/javascript" src="/js/placeholder.js"></script>
<title>注册</title>
<script type="text/javascript">
$(function() {
	 $("#hqver").click(function(){
		sendCode();
	 });

	 $('input').placeholder();//ie7input显示提示信息
	 hideAccNameLable();
	 hideMobileLable();
	 hideCheckCodeLable();
	 
});

$(function(){
	  $(document).keydown(function(event){
	    if(event.keyCode==13){
	    	registerNextClick();
	    }
 });
});

//提交到下一步注册
function registerNextClick(){
	if(testAccName()&&testmobile()&&testMobileCode01()&&getCheckBoxValue()){
		$('#registerNext').submit();
	}
	
}


//隐藏惠信号提示
function hideAccNameLable(){
	var accName=$("#accName").val();
	if(accName==""){
		$("#accNameMsg").hide();
	}
	
}

//隐藏手机号提示
function hideMobileLable(){
	var mobile=$("#mobile").val();
	if(mobile==""){
		$("#mobileMsg").hide();
	}
	
}

//隐藏验证码提示
function hideCheckCodeLable(){
	var checkCode=$("#checkCode").val();
	if(checkCode==""){
		$("#sendErrorMsg").hide();
	}
	
}


</script>

</head>
<body>
<!--header-->
<%@include file="/head.jsp"%>
<!--/header-->
<!--main-->
<div class="main_bg">        	
	<div class="regist">
    	<h3 class="tit_step1"></h3>
    	<form action="${root}/userAction_registerNext.action" id="registerNext"  name="registerNext" method="post">
        <ul>
        	<li class="clearfix">
            	<label>惠信号：</label>
                <div class="position"><input id="accName" name="userRegister.accName" value="<s:property value="userRegister.accName"/>" type="text" class="input" maxlength="20" placeholder="创建您的惠信号，它可以登录所有惠信产品" onblur="testAccName();" /><span class="in_dea_text"></span></div>
                <p class="suc_tips" id="accNmaeRight" style="display:none;"></p>
                <p class="err_tips" id="accNameMsg" style="display:none;"></p>
            </li>
            <li class="clearfix">
            	<label>手机号：</label>
                <div class="position"><input id="mobile" name="userRegister.mobile" value="<s:property value="userRegister.mobile"/>" type="text" class="input"  placeholder="请输入您的手机号码" onblur="testmobile();" maxlength="11" /><span class="in_dea_text"></span></div>
                <p class="suc_tips" id="mobileRight" style="display:none;"></p>
                <p class="err_tips" id="mobileMsg" style="display:none;"></p>
            </li>
            <li class="clearfix">
            	<label>验证码：</label>
                <div class="position"><input type="text" id="checkCode" name="checkCode" value="<s:property value="checkCode"/>" class="input" style="width:226px;" readOnly="readonly" placeholder="手机验证码" onblur="testMobileCode01();" maxlength="6" /><span class="in_dea_text"></span></div>
            	<a href="javascript:void(0);" class="l send" id="hqver" name="hqver">发送</a>
            	<p class="err_tips" id="sendErrorMsg" style="display:none;"></p>
            	<p class="suc_tips" id="sendRigntMsg" style="display:none;"></p>
            </li>
            <li class="clearfix agree"><input id="i_agreeb" type="checkbox" value="" class="l mar_li" checked="true"><label for="agree">我已阅读并同意<a href="${root}/staticAction_serviceAgreement.action" target="_blank" class="blue">《惠信钱包服务协议》</a></label>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:red" id="i_agreeb_msg"></span></li>
            <li class="clearfix"><a href="javascript:void(0);" onclick="javascript:registerNextClick();" class="mar_li btn l">下一步</a></li>
        </ul>
         </form>
    </div>

            

</div>
<!--/main-->
<!--footer-->
<%@include file="/footer.jsp"%>
</body>

<script type="text/javascript">

<s:if test="dataMap.accNameErrorMsg != null && dataMap.accNameErrorMsg !='' ">
	$("#checkCode").removeAttr("readonly");//移除不可输入属性
	$("#accNameMsg").show();
	$("#accNameMsg").text("<s:property value="dataMap.accNameErrorMsg"/>");
</s:if>

<s:if test="dataMap.mobileErrorMsg != null && dataMap.mobileErrorMsg !='' ">
	$("#checkCode").removeAttr("readonly");//移除不可输入属性
	$("#mobileMsg").show();
	$("#mobileMsg").text("<s:property value="dataMap.mobileErrorMsg"/>");
</s:if>

<s:if test="dataMap.checkCodeErrorMsg != null && dataMap.checkCodeErrorMsg !='' ">
	$("#checkCode").removeAttr("readonly");//移除不可输入属性
	$("#sendErrorMsg").show();
	$("#sendErrorMsg").text("<s:property value="dataMap.checkCodeErrorMsg"/>");
</s:if>

</script>
</html>
